package cn.com.code.design;

import java.math.BigDecimal;

/**
 * @author zhengpei
 * @date 2021/11/4
 */
public class Context<T> {

  private ICouponDiscount<T> couponDiscount;

  public Context(ICouponDiscount<T> couponDiscount) {
    this.couponDiscount = couponDiscount;
  }

  public BigDecimal discountAmount(T couponInfo, BigDecimal skuPrice) {
    return couponDiscount.discountAmount(couponInfo, skuPrice);
  }

}
